<?php
use Jialeo\LaravelSchemaExtend\Schema;
// use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAuthDeptsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('auth_depts', function (Blueprint $table) {
            $table->comment = '部门表';
            $table->increments('id')->comment('部门ID');
            $table->char('name', 100)->default('')->comment('部门名称');
            $table->char('leader', 100)->default('')->comment('负责人');
            $table->char('phone', 50)->default('')->comment('联系电话');
            $table->char('email', 100)->default('')->comment('邮箱');
            $table->tinyInteger('status')->default(1)->comment('显示状态:0=隐藏,1=显示');
            $table->integer('pid')->default(0)->comment('父级ID');
            $table->integer('sort')->default(1)->comment('排序');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('auth_depts');
    }
}
